package com.zb.service;

import com.zb.bean.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookService {

    //增加一个Book
    int addBook(Book book);

    //根据id删除一个Book
    int deleteBookById(@Param("id") int id);

    //更新Book
    int updateBook(Book book);

    //根据id查询,返回一个Book
    Book queryBookById(@Param("id") int id);

    //查询全部Book,返回list集合
    List<Book> queryAllBook();

    List<Book> queryBookByName(String bookName);

}
